<?php

namespace App\Http\Requests\Api;

class LngLatRequest extends FormRequest
{
    public function rules()
    {
        switch ($this->method()) {
            case 'GET':
                $arr = [
                    'lng' => 'required|numeric',
                    'lat' => 'required|numeric',
                ];
                return $arr;
                break;
        }
    }

    public function attributes()
    {
        return [
            'lng' => '经度',
            'lat' => '纬度',
        ];
    }
}
